package com.atguigu.eduservice;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.hystrix.EnableHystrix;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;

@EnableDiscoveryClient  //添加注册，将该服务注册到注册中心
@EnableFeignClients //Feign是在消费端（就是在方法调用者）中的注解，该注解默认打开了断路器@EnableHystrix或者@EnableCircuitBreaker
//@EnableHystrix //开启熔断器
@SpringBootApplication
@ComponentScan(basePackages = {"com.atguigu"})//为什么需要扫描组件？因为值默认只扫描启动类下面的包，但是需要扫描Swagger配置类
public class EduApplication {
    public static void main(String[] args) {
        SpringApplication.run(EduApplication.class,args);
    }
}
